package com.property.demo.service;

import com.property.demo.model.Home;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface HomeService {
    
    List<Home> findAll();
    
    Page<Home> findAll(Pageable pageable);
    
    Page<Home> findByFilters(Long buildingId, Long ownerId, String name, String status, Pageable pageable);
    
    Optional<Home> findById(Long id);
    
    Home save(Home home);
    
    Home update(Long id, Home homeDetails);
    
    void delete(Long id);
    
    void deleteAll(List<Long> ids);
    
    List<Home> findByBuildingId(Long buildingId);
    
    List<Home> findByOwnerId(Long ownerId);
    
    List<Home> findByNameContaining(String name);
    
    List<Home> findByStatus(String status);
} 